import Index from '@/views/home/index.vue'
import { createRouter, createWebHistory } from 'vue-router'


const router = createRouter({
  history: createWebHistory(import.meta.env.BASE_URL),
  routes: [
    {
      path: '/',
      redirect:'/home'
    },
    {
      path: '/home',
      component: Index,
      children: [{
        path: '/detail/:id?',
        component:()=>import("@/views/detail/index.vue")}]
    },
    {
      path: '/login',
      component:()=>import("@/views/login/index.vue")
    }
  ],
})

export default router
